#!/usr/bin/perl

$IMG_URL="http://particle.phys.uvic.ca/~web-atlas/atlas/feedthroughs/status/image/BrushedMetal.gif";
$BASE="/hepuser/pof/atlas/ElectricalTests/pro/dat";
$BAS_URL="http://particle.phys.uvic.ca/~web-atlas/atlas/feedthroughs/status";
$VC_URL=$BAS_URL . "/cgi-bin/AtlFtVCPage.pl";

$query_string = $ENV{'QUERY_STRING'};
#$query_string = "ft00:spc";

($FT, $FTYP) = split ( /:/, $query_string);

if ( $FTYP eq "std" ) {
  $NAME = Standard;
} elsif ( $FTYP eq "spc" ) {
  $NAME = Special;
} elsif ( $FTYP eq "hec" ) {
  $NAME = HEC;
} elsif ( $FTYP eq "fcl" ) {
  $NAME = FCAL;
}

$ZCAT = "/bin/zcat";
$COMPONENTS = "$BASE/Components/ft.components.gz";

$components = `$ZCAT $COMPONENTS`;
@lines = split /\n/, $components;

$irec=0;
foreach $line (@lines) 
{
  chomp $line;
  $line =~ s/^\s+//; $line =~ s/\s+$//;
  @words = split /\s+/, $line;
  if ( @words[0] eq $FT )
  {
    $hard = @lines[$irec];
    $pig = @lines[$irec+1];
    $vac = @lines[$irec+2];
    last;
  }
  else
  {
    $irec++;
  }
}

@hardware = split /\s+/, $hard;
@pigtails = split /\s+/, $pig;
@vacables = split /\s+/, $vac;

$FT = @hardware[0];
$FunASS = @hardware[1];
$LowFun = @hardware[2];
$FunBase = @hardware[3];
$BellowsASS = @hardware[4];
$CuffRing = @hardware[5];
$SealRing = @hardware[6];
$ColdFlange = @hardware[7];
$ColdFlangePCA7 = @hardware[8];
$ColdFlangePCA8 = @hardware[9];
$ColdFlangePCB7 = @hardware[10];
$ColdFlangePCB8 = @hardware[11];
$WarmFlange = @hardware[12];
$WarmFlangePCA7 = @hardware[13];
$WarmFlangePCA8 = @hardware[14];
$WarmFlangePCB7 = @hardware[15];
$WarmFlangePCB8 = @hardware[16];
$VCR7 = @hardware[17];
$VCR8 = @hardware[18];

$PTA01SerialNum = @pigtails[1];
$PTA01Type = @pigtails[2];
$PTB01SerialNum = @pigtails[4];
$PTB01Type = @pigtails[5];
$PTA02SerialNum = @pigtails[7]; 
$PTA02Type = @pigtails[8];
$PTB02SerialNum = @pigtails[10]; 
$PTB02Type = @pigtails[11];
$PTA03SerialNum = @pigtails[13]; 
$PTA03Type = @pigtails[14];
$PTB03SerialNum = @pigtails[16]; 
$PTB03Type = @pigtails[17];
$PTA04SerialNum = @pigtails[19]; 
$PTA04Type = @pigtails[20];
$PTB04SerialNum = @pigtails[22]; 
$PTB04Type = @pigtails[23];
$PTA05SerialNum = @pigtails[25]; 
$PTA05Type = @pigtails[26];
$PTB05SerialNum = @pigtails[28]; 
$PTB05Type = @pigtails[29];
$PTA06SerialNum = @pigtails[31]; 
$PTA06Type = @pigtails[32];
$PTB06SerialNum = @pigtails[34];
$PTB06Type = @pigtails[35];
$PTA07SerialNum = @pigtails[37]; 
$PTA07Type = @pigtails[38];
$PTB07SerialNum = @pigtails[40]; 
$PTB07Type = @pigtails[41];
$PTA08SerialNum = @pigtails[43]; 
$PTA08Type = @pigtails[44];
$PTB08SerialNum = @pigtails[46]; 
$PTB08Type = @pigtails[47];
$PTA09SerialNum = @pigtails[49]; 
$PTA09Type = @pigtails[50];
$PTB09SerialNum = @pigtails[52]; 
$PTB09Type = @pigtails[53];
$PTA10SerialNum = @pigtails[55]; 
$PTA10Type = @pigtails[56];
$PTB10SerialNum = @pigtails[58]; 
$PTB10Type = @pigtails[59];
$PTA11SerialNum = @pigtails[61]; 
$PTA11Type = @pigtails[62];
$PTB11SerialNum = @pigtails[64]; 
$PTB11Type = @pigtails[65];
$PTA12SerialNum = @pigtails[67]; 
$PTA12Type = @pigtails[68];
$PTB12SerialNum = @pigtails[70]; 
$PTB12Type = @pigtails[71];
$PTA13SerialNum = @pigtails[73]; 
$PTA13Type = @pigtails[74];
$PTB13SerialNum = @pigtails[76]; 
$PTB13Type = @pigtails[77];
$PTA14SerialNum = @pigtails[79]; 
$PTA14Type = @pigtails[80];
$PTB14SerialNum = @pigtails[82];
$PTB14Type = @pigtails[83];
$PTA15SerialNum = @pigtails[85]; 
$PTA15Type = @pigtails[86];
$PTB15SerialNum = @pigtails[88]; 
$PTB15Type = @pigtails[89];

$VCA01SerialNum = @vacables[1]; 
$VCA01Type = @vacables[2];
$VCB01SerialNum = @vacables[4]; 
$VCB01Type = @vacables[5];
$VCA02SerialNum = @vacables[7]; 
$VCA02Type = @vacables[8];
$VCB02SerialNum = @vacables[10]; 
$VCB02Type = @vacables[11];
$VCA03SerialNum = @vacables[13]; 
$VCA03Type = @vacables[14];
$VCB03SerialNum = @vacables[16]; 
$VCB03Type = @vacables[17];
$VCA04SerialNum = @vacables[19]; 
$VCA04Type = @vacables[20];
$VCB04SerialNum = @vacables[22]; 
$VCB04Type = @vacables[23];
$VCA05SerialNum = @vacables[25]; 
$VCA05Type = @vacables[26];
$VCB05SerialNum = @vacables[28]; 
$VCB05Type = @vacables[29];
$VCA06SerialNum = @vacables[31]; 
$VCA06Type = @vacables[32];
$VCB06SerialNum = @vacables[34]; 
$VCB06Type = @vacables[35];
$VCA07SerialNum = @vacables[37]; 
$VCA07Type = @vacables[38];
$VCB07SerialNum = @vacables[40]; 
$VCB07Type = @vacables[41];
$VCA08SerialNum = @vacables[43]; 
$VCA08Type = @vacables[44];
$VCB08SerialNum = @vacables[46]; 
$VCB08Type = @vacables[47];
$VCA09SerialNum = @vacables[49]; 
$VCA09Type = @vacables[50];
$VCB09SerialNum = @vacables[52]; 
$VCB09Type = @vacables[53];
$VCA10SerialNum = @vacables[55]; 
$VCA10Type = @vacables[56];
$VCB10SerialNum = @vacables[58]; 
$VCB10Type = @vacables[59];
$VCA11SerialNum = @vacables[61]; 
$VCA11Type = @vacables[62];
$VCB11SerialNum = @vacables[64]; 
$VCB11Type = @vacables[65];
$VCA12SerialNum = @vacables[67]; 
$VCA12Type = @vacables[68];
$VCB12SerialNum = @vacables[70]; 
$VCB12Type = @vacables[71];
$VCA13SerialNum = @vacables[73]; 
$VCA13Type = @vacables[74];
$VCB13SerialNum = @vacables[76]; 
$VCB13Type = @vacables[77];
$VCA14SerialNum = @vacables[79]; 
$VCA14Type = @vacables[80];
$VCB14SerialNum = @vacables[82]; 
$VCB14Type = @vacables[83];
$VCA15SerialNum = @vacables[85]; 
$VCA15Type = @vacables[86];
$VCB15SerialNum = @vacables[88]; 
$VCB15Type = @vacables[89];

$PAGE1= '<html>
<body style="background-image: url(' . $IMG_URL . ')">

<head>
  <title>UVIC Signal Feedthrough Summary Page</title>
</head>

<center>
  <font color="#FF0000"> <a href=' . $BAS_URL . '> Return to ATLAS Endcap Signal Feedthroughs Status Page </a> </font> <br>
  <br>
  <b><font face="Zurich BT" font size=+3 color=red> EndCap Signal FeedThrough Summary Page <br>'
  . $NAME . ' FeedThrough ' . $FT . '</font> </b> <br>
  <br>
  
 <table BORDER WIDTH="500" HEIGHT="100" >
   <tr> 
     <td> <b> Hardware Component List </b> </td>
     <td> <b> Serial Number </b> </td>
   </tr>
   <tr> 
     <td> <font color="#0000FF"> Funnel Assembly </font> </td>
     <td>' . lc($FunASS) . '</td>
   </tr>
   <tr> 
     <td><font color="#0000FF">Lower Funnel Tube </font> </td>
     <td>' . lc($LowFun)  . '</td>
   </tr>
   <tr> 
     <td><font color="#0000FF"> Funnel Base </font> </td>
     <td>' . lc($FunBase)  . '</td>
   </tr>
   <tr> 
     <td><font color="#0000FF"> Bellows Assembly </font> </td>
     <td>' . lc($BellowsASS)  . '</td>
   </tr>
   <tr> 
     <td><font color="#0000FF"> Cuff Ring </font> </td>
     <td>' . lc($CuffRing)  . '</td>
   </tr>
   <tr> 
     <td><font color="#0000FF"> Seal Ring </font> </td>
     <td>' . lc($SealRing)  . '</td>
   </tr>
   <tr> 
     <td><font color="#0000FF"> Cold Flange </font> </td>
     <td>' . lc($ColdFlange)  . '</td>
   </tr>
   <tr> 
     <td><font color="#0000FF"> Cold Flange Pin Carrier A7 </font> </td>
     <td>' . lc($ColdFlangePCA7)  . '</td>
   </tr>
   <tr> 
     <td><font color="#0000FF"> Cold Flange Pin Carrier A8 </font> </td>
     <td>' . lc($ColdFlangePCA8)  . '</td>
   </tr>
   <tr> 
     <td><font color="#0000FF"> Cold Flange Pin Carrier B7 </font> </td>
     <td>' . lc($ColdFlangePCB7)  . '</td>
   </tr>
   <tr> 
     <td><font color="#0000FF"> Cold Flange Pin Carrier B8 </font> </td>
     <td>' . lc($ColdFlangePCB8)  . '</td>
   </tr>
   <tr> 
     <td><font color="#0000FF"> Warm Flange </font> </td>
     <td>' . lc($WarmFlange)  . '</td>
   </tr>
   <tr> 
     <td><font color="#0000FF"> Warm Flange Pin Carrier A7 </font> </td>
     <td>' . lc($WarmFlangePCA7)  . '</td>
   </tr>
   <tr> 
     <td><font color="#0000FF"> Warm Flange Pin Carrier A8 </font> </td>
     <td>' . lc($WarmFlangePCA8)  . '</td>
   </tr>
   <tr> 
     <td><font color="#0000FF"> Warm Flange Pin Carrier B7 </font> </td>
     <td>' . lc($WarmFlangePCB7)  . '</td>
   </tr>
   <tr> 
     <td><font color="#0000FF"> Warm Flange Pin Carrier B8 </font> </td>
     <td>' . lc($WarmFlangePCB8)  . '</td>
   </tr>
   <tr> 
     <td><font color="#0000FF"> VCR Gland 7 Row Side </font> </td>
     <td>' . lc($VCR7)  . '</td>
   </tr>
   <tr> 
     <td><font color="#0000FF"> VCR Gland 8 Row Side </font> </td>
     <td>' . lc($VCR8) . '</td>
   </tr>
 </table> <br>';

 $PAGE2= '<table width="75%" border="1">
   <tr><td colspan="7"> 
         <div align="center"><font color="#000099"> <b>  PIGTAILS  </b> </font> </div> 
       </td>
   </tr>
   <tr><td width="100"> 
         <div align="center"><font color="#000099"> <b>  Position  </b> </font> </div>
       </td>
       <td> 
         <div align="center"><font color="#000099"> <b>  Serial Number  </b> </font> </div>
       </td>
       <td> 
         <div align="center"><font color="#000099"> <b>  Type  </b> </font> </div>
       </td>
       <td></td>
       <td width="100"> 
         <div align="center"><font color="#000099"> <b>  Position  </b> </font> </div>
       </td>
       <td> 
         <div align="center"><font color="#000099"> <b>  Serial Number  </b> </font> </div>
       </td>
       <td> 
         <div align="center"><font color="#000099"> <b>  Type  </b> </font> </div>
      </td>
   </tr>
    
   <tr>
      <td><div align="center"><font color="#0000FF"> A01 </font> </div> </td>
      <td>' . $PTA01SerialNum . '</td>
      <td>' . $PTA01Type . '</td>
      <td></td>
      <td><div align="center"><font color="#0000FF"> B01 </font> </div> </td>
      <td>' . $PTB01SerialNum . '</td>
      <td>' . $PTB01Type . '</td>
    </tr>
    <tr>
      <td><div align="center"><font color="#0000FF"> A02 </font> </div> </td>
      <td>' . $PTA02SerialNum . '</td>
      <td>' . $PTA02Type . '</td>
      <td></td>
      <td><div align="center"><font color="#0000FF"> B02 </font> </div> </td>
      <td>' . $PTB02SerialNum . '</td>
      <td>' . $PTB02Type . '</td>
    </tr>
    <tr>
      <td><div align="center"><font color="#0000FF"> A03 </font> </div> </td>
      <td>' . $PTA03SerialNum . '</td>
      <td>' . $PTA03Type . '</td>
      <td></td>
      <td><div align="center"><font color="#0000FF"> B03 </font> </div> </td>
      <td>' . $PTB03SerialNum . '</td>
      <td>' . $PTB03Type . '</td>
    </tr>
    <tr> 
      <td><div align="center"><font color="#0000FF"> A04 </font> </div> </td>
      <td>' . $PTA04SerialNum . '</td>
      <td>' . $PTA04Type . '</td>
      <td></td>
      <td><div align="center"><font color="#0000FF"> B04 </font> </div> </td>
      <td>' . $PTB04SerialNum . '</td>
      <td>' . $PTB04Type . '</td>
    </tr>
    <tr> 
      <td><div align="center"><font color="#0000FF"> A05 </font> </div> </td>
      <td>' . $PTA05SerialNum . '</td>
      <td>' . $PTA05Type . '</td>
      <td></td>
      <td><div align="center"><font color="#0000FF"> B05 </font> </div> </td>
      <td>' . $PTB05SerialNum . '</td>
      <td>' . $PTB05Type . '</td>
    </tr>
    <tr> 
      <td><div align="center"><font color="#0000FF"> A06 </font> </div> </td>
      <td>' . $PTA06SerialNum . '</td>
      <td>' . $PTA06Type . '</td>
      <td></td>
      <td><div align="center"><font color="#0000FF"> B06 </font> </div> </td>
      <td>' . $PTB06SerialNum . '</td>
      <td>' . $PTB06Type . '</td>
    </tr>
    <tr> 
      <td><div align="center"><font color="#0000FF"> A07 </font> </div> </td>
      <td>' . $PTA07SerialNum . '</td>
      <td>' . $PTA07Type . '</td>
      <td></td>
      <td><div align="center"><font color="#0000FF"> B07 </font> </div> </td>
      <td>' . $PTB07SerialNum . '</td>
      <td>' . $PTB07Type . '</td>
    </tr>
    <tr> 
      <td><div align="center"><font color="#0000FF"> A08 </font> </div> </td>
      <td>' . $PTA08SerialNum . '</td>
      <td>' . $PTA08Type . '</td>
      <td></td>
      <td><div align="center"><font color="#0000FF"> B08 </font> </div> </td>
      <td>' . $PTB08SerialNum . '</td>
      <td>' . $PTB08Type . '</td>
    </tr>
    <tr> 
      <td><div align="center"><font color="#0000FF"> A09 </font> </div> </td>
      <td>' . $PTA09SerialNum . '</td>
      <td>' . $PTA09Type . '</td>
      <td></td>
      <td><div align="center"><font color="#0000FF"> B09 </font> </div> </td>
      <td>' . $PTB09SerialNum . '</td>
      <td>' . $PTB09Type . '</td>
    </tr>
    <tr> 
      <td><div align="center"><font color="#0000FF"> A10 </font> </div> </td>
      <td>' . $PTA10SerialNum . '</td>
      <td>' . $PTA10Type . '</td>
      <td></td>
      <td><div align="center"><font color="#0000FF"> B10 </font> </div> </td>
      <td>' . $PTB10SerialNum . '</td>
      <td>' . $PTB10Type . '</td>
    </tr>
    <tr> 
      <td><div align="center"><font color="#0000FF"> A11 </font> </div> </td>
      <td>' . $PTA11SerialNum . '</td>
      <td>' . $PTA11Type . '</td>
      <td></td>
      <td><div align="center"><font color="#0000FF"> B11 </font> </div> </td>
      <td>' . $PTB11SerialNum . '</td>
      <td>' . $PTB11Type . '</td>
    </tr>
    <tr> 
      <td><div align="center"><font color="#0000FF"> A12 </font> </div> </td>
      <td>' . $PTA12SerialNum . '</td>
      <td>' . $PTA12Type . '</td>
      <td></td>
      <td><div align="center"><font color="#0000FF"> B12 </font> </div> </td>
      <td>' . $PTB12SerialNum . '</td>
      <td>' . $PTB12Type . '</td>
    </tr>
    <tr> 
      <td><div align="center"><font color="#0000FF"> A13 </font> </div> </td>
      <td>' . $PTA13SerialNum . '</td>
      <td>' . $PTA13Type . '</td>
      <td></td>
      <td><div align="center"><font color="#0000FF"> B13 </font> </div> </td>
      <td>' . $PTB13SerialNum . '</td>
      <td>' . $PTB13Type . '</td>
    </tr>
    <tr> 
      <td><div align="center"><font color="#0000FF"> A14 </font> </div> </td>
      <td>' . $PTA14SerialNum . '</td>
      <td>' . $PTA14Type . '</td>
      <td></td>
      <td><div align="center"><font color="#0000FF"> B14 </font> </div> </td>
      <td>' . $PTB14SerialNum . '</td>
      <td>' . $PTB14Type . '</td>
    </tr>
    <tr> 
      <td><div align="center"><font color="#0000FF"> A15 </font> </div> </td>
      <td>' . $PTA15SerialNum . '</td>
      <td>' . $PTA15Type . '</td>
      <td></td>
      <td><div align="center"><font color="#0000FF"> B15 </font> </div> </td>
      <td>' . $PTB15SerialNum . '</td>
      <td>' . $PTB15Type . '</td>
    </tr>
  </table> <br>';

  $PAGE3= '<table width="75%" border="1">
    <tr> 
      <td colspan="7"> 
        <div align="center"><font color="#000099"><b> VACUUM CABLES </b></font></div>
      </td>
    </tr>
    <tr> 
      <td width="100"> 
        <div align="center"><font color="#000099"><b> Position </b></font></div>
      </td>
      <td> 
        <div align="center"><font color="#000099"><b> Serial Number </b></font></div>
      </td>
      <td> 
        <div align="center"><font color="#000099"><b> Type </b></font></div>
      </td>
      <td> 
        <div align="center"><font color="#000099"><b></b></font></div>
      </td>
      <td width="100"> 
        <div align="center"><font color="#000099"><b> Position </b></font></div>
      </td>
      <td> 
        <div align="center"><font color="#000099"><b> Serial Number </b></font></div>
      </td>
      <td>
        <div align="center"><font color="#000099"><b> Type </b></font></div>
      </td>
    </tr>
    <tr> 
      <td><div align="center"><font color="#0000FF"> A01 </font> </div> </td>
      <td> <a href= ' . $VC_URL . '?' . $FT . ':' . $FTYP . ':a01:' . lc($VCA01SerialNum) . '>' 
           . lc($VCA01SerialNum) . '</a> </td>
      <td>' . $VCA01Type . '</td>
      <td></td>
      <td><div align="center"><font color="#0000FF"> B01 </font> </div> </td>
      <td> <a href= ' . $VC_URL . '?' . $FT . ':' . $FTYP . ':b01:' . lc($VCB01SerialNum) . '>' 
           . lc($VCB01SerialNum) . '</a> </td>
      <td>' . $VCB01Type . '</td>
    </tr>
    <tr> 
      <td><div align="center"><font color="#0000FF"> A02 </font> </div> </td>
      <td> <a href= ' . $VC_URL . '?' . $FT . ':' . $FTYP . ':a02:' . lc($VCA02SerialNum) . '>' 
           . lc($VCA02SerialNum) . '</a> </td>
      <td>' . $VCA02Type . '</td>
      <td></td>
      <td><div align="center"><font color="#0000FF"> B02 </font> </div> </td>
      <td> <a href= ' . $VC_URL . '?' . $FT . ':' . $FTYP . ':b02:' . lc($VCB02SerialNum) . '>' 
           . lc($VCB02SerialNum) . '</a> </td>
      <td>' . $VCB02Type . '</td>
    </tr>
    <tr> 
      <td><div align="center"><font color="#0000FF"> A03 </font> </div> </td>
      <td> <a href= ' . $VC_URL . '?' . $FT . ':' . $FTYP . ':a03:' . lc($VCA03SerialNum) . '>' 
           . lc($VCA03SerialNum) . '</a> </td>
      <td>' . $VCA03Type . '</td>
      <td></td>
      <td><div align="center"><font color="#0000FF"> B03 </font> </div> </td>
      <td> <a href= ' . $VC_URL . '?' . $FT . ':' . $FTYP . ':b03:' . lc($VCB03SerialNum) . '>' 
           . lc($VCB03SerialNum) . '</a> </td>
      <td>' . $VCB03Type . '</td>
    </tr>
    <tr> 
      <td><div align="center"><font color="#0000FF"> A04 </font> </div> </td>
      <td> <a href= ' . $VC_URL . '?' . $FT . ':' . $FTYP . ':a04:' . lc($VCA04SerialNum) . '>' 
           . lc($VCA04SerialNum) . '</a> </td>
      <td>' . $VCA04Type . '</td>
      <td></td>
      <td><div align="center"><font color="#0000FF"> B04 </font> </div> </td>
      <td> <a href= ' . $VC_URL . '?' . $FT . ':' . $FTYP . ':b04:' . lc($VCB04SerialNum) . '>' 
           . lc($VCB04SerialNum) . '</a> </td>
      <td>' . $VCB04Type . '</td>
    </tr>
    <tr> 
      <td><div align="center"><font color="#0000FF"> A05 </font> </div> </td>
      <td> <a href= ' . $VC_URL . '?' . $FT . ':' . $FTYP . ':a05:' . lc($VCA05SerialNum) . '>' 
           . lc($VCA05SerialNum) . '</a> </td>
      <td>' . $VCA05Type . '</td>
      <td></td>
      <td><div align="center"><font color="#0000FF"> B05 </font> </div> </td>
      <td> <a href= ' . $VC_URL . '?' . $FT . ':' . $FTYP . ':b05:' . lc($VCB05SerialNum) . '>' 
           . lc($VCB05SerialNum) . '</a> </td>
      <td>' . $VCB05Type . '</td>
    </tr>
    <tr> 
      <td><div align="center"><font color="#0000FF"> A06 </font> </div> </td>
      <td> <a href= ' . $VC_URL . '?' . $FT . ':' . $FTYP . ':a06:' . lc($VCA06SerialNum) . '>' 
           . lc($VCA06SerialNum) . '</a> </td>
      <td>' . $VCA06Type . '</td>
      <td></td>
      <td><div align="center"><font color="#0000FF"> B06 </font> </div> </td>
      <td> <a href= ' . $VC_URL . '?' . $FT . ':' . $FTYP . ':b06:' . lc($VCB06SerialNum) . '>' 
           . lc($VCB06SerialNum) . '</a> </td>
      <td>' . $VCB06Type . '</td>
    </tr>
    <tr> 
      <td><div align="center"><font color="#0000FF"> A07 </font> </div> </td>
      <td> <a href= ' . $VC_URL . '?' . $FT . ':' . $FTYP . ':a07:' . lc($VCA07SerialNum) . '>' 
           . lc($VCA07SerialNum) . '</a> </td>
      <td>' . $VCA07Type . '</td>
      <td></td>
      <td><div align="center"><font color="#0000FF"> B07 </font> </div> </td>
      <td> <a href= ' . $VC_URL . '?' . $FT . ':' . $FTYP . ':b07:' . lc($VCB07SerialNum) . '>' 
           . lc($VCB07SerialNum) . '</a> </td>
      <td>' . $VCB07Type . '</td>
    </tr>
    <tr> 
      <td><div align="center"><font color="#0000FF"> A08 </font> </div> </td>
      <td> <a href= ' . $VC_URL . '?' . $FT . ':' . $FTYP . ':a08:' . lc($VCA08SerialNum) . '>' 
           . lc($VCA08SerialNum) . '</a> </td>
      <td>' . $VCA08Type . '</td>
      <td></td>
      <td><div align="center"><font color="#0000FF"> B08 </font> </div> </td>
      <td> <a href= ' . $VC_URL . '?' . $FT . ':' . $FTYP . ':b08:' . lc($VCB08SerialNum) . '>' 
           . lc($VCB08SerialNum) . '</a> </td>
      <td>' . $VCB08Type . '</td>
    </tr>
    <tr> 
      <td><div align="center"><font color="#0000FF"> A09 </font> </div> </td>
      <td> <a href= ' . $VC_URL . '?' . $FT . ':' . $FTYP . ':a09:' . lc($VCA09SerialNum) . '>' 
           . lc($VCA09SerialNum) . '</a> </td>
      <td>' . $VCA09Type . '</td>
      <td></td>
      <td><div align="center"><font color="#0000FF"> B09 </font> </div> </td>
      <td> <a href= ' . $VC_URL . '?' . $FT . ':' . $FTYP . ':b09:' . lc($VCB09SerialNum) . '>' 
           . lc($VCB09SerialNum) . '</a> </td>
      <td>' . $VCB09Type . '</td>
    </tr>
    <tr> 
      <td><div align="center"><font color="#0000FF"> A10 </font> </div> </td>
      <td> <a href= ' . $VC_URL . '?' . $FT . ':' . $FTYP . ':a10:' . lc($VCA10SerialNum) . '>' 
           . lc($VCA10SerialNum) . '</a> </td>
      <td>' . $VCA10Type . '</td>
      <td></td>
      <td><div align="center"><font color="#0000FF"> B10 </font> </div> </td>
      <td> <a href= ' . $VC_URL . '?' . $FT . ':' . $FTYP . ':b10:' . lc($VCB10SerialNum) . '>' 
           . lc($VCB10SerialNum) . '</a> </td>
      <td>' . $VCB10Type . '</td>
    </tr>
    <tr> 
      <td><div align="center"><font color="#0000FF"> A11 </font> </div> </td>
      <td> <a href= ' . $VC_URL . '?' . $FT . ':' . $FTYP . ':a11:' . lc($VCA11SerialNum) . '>' 
           . lc($VCA11SerialNum) . '</a> </td>
      <td>' . $VCA11Type . '</td>
      <td></td>
      <td><div align="center"><font color="#0000FF"> B11 </font> </div> </td>
      <td> <a href= ' . $VC_URL . '?' . $FT . ':' . $FTYP . ':b11:' . lc($VCB11SerialNum) . '>' 
           . lc($VCB11SerialNum) . '</a> </td>
      <td>' . $VCB11Type . '</td>
    </tr>
    <tr> 
      <td><div align="center"><font color="#0000FF"> A12 </font> </div> </td>
      <td> <a href= ' . $VC_URL . '?' . $FT . ':' . $FTYP . ':a12:' . lc($VCA12SerialNum) . '>' 
           . lc($VCA12SerialNum) . '</a> </td>
      <td>' . $VCA12Type . '</td>
      <td></td>
      <td><div align="center"><font color="#0000FF"> B12 </font> </div> </td>
      <td> <a href= ' . $VC_URL . '?' . $FT . ':' . $FTYP . ':b12:' . lc($VCB12SerialNum) . '>' 
           . lc($VCB12SerialNum) . '</a> </td>
      <td>' . $VCB12Type . '</td>
    </tr>
    <tr> 
      <td><div align="center"><font color="#0000FF"> A13 </font> </div> </td>
      <td> <a href= ' . $VC_URL . '?' . $FT . ':' . $FTYP . ':a13:' . lc($VCA13SerialNum) . '>' 
           . lc($VCA13SerialNum) . '</a> </td>
      <td>' . $VCA13Type . '</td>
      <td></td>
      <td><div align="center"><font color="#0000FF"> B13 </font> </div> </td>
      <td> <a href= ' . $VC_URL . '?' . $FT . ':' . $FTYP . ':b13:' . lc($VCB13SerialNum) . '>' 
           . lc($VCB13SerialNum) . '</a> </td>
      <td>' . $VCB13Type . '</td>
    </tr>
    <tr> 
      <td><div align="center"><font color="#0000FF"> A14 </font> </div> </td>
      <td> <a href= ' . $VC_URL . '?' . $FT . ':' . $FTYP . ':a14:' . lc($VCA14SerialNum) . '>' 
           . lc($VCA14SerialNum) . '</a> </td>
      <td>' . $VCA14Type . '</td>
      <td></td>
      <td><div align="center"><font color="#0000FF"> B14 </font> </div> </td>
      <td> <a href= ' . $VC_URL . '?' . $FT . ':' . $FTYP . ':b14:' . lc($VCB14SerialNum) . '>' 
           . lc($VCB14SerialNum) . '</a> </td>
      <td>' . $VCB14Type . '</td>
    </tr>
    <tr> 
      <td><div align="center"><font color="#0000FF"> A15 </font> </div> </td>
      <td> <a href= ' . $VC_URL . '?' . $FT . ':' . $FTYP . ':a15:' . lc($VCA15SerialNum) . '>' 
           . lc($VCA15SerialNum) . '</a> </td>
      <td>' . $VCA15Type . '</td>
      <td></td>
      <td><div align="center"><font color="#0000FF"> B15 </font> </div> </td>
      <td> <a href= ' . $VC_URL . '?' . $FT . ':' . $FTYP . ':b15:' . lc($VCB15SerialNum) . '>' 
           . lc($VCB15SerialNum) . '</a> </td>
      <td>' . $VCB15Type . '</td>
    </tr>
  </table> <br>
  
</center>

</body>
</html>';

print "Content-type: text/html\n\n";

print "$PAGE1 $PAGE2 $PAGE3";

exit(0);
